package models

import (
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)" json:"username"`
	Password string `gorm:"type:varchar(50)" json:"password"`
	RoleID   uint   `gorm:"type:int" json:"role_id"`
	Role     Role   `gorm:"foreignKey:RoleID" json:"role"`
}

type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)" json:"name"`
}
